﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Cesave.Domain.PermisosModule.Entities;
using Cesave.Domain.Core.Specification;

namespace Cesave.Domain.PermisosModule.Contracts.ProduccionTipos
{
	public class ProduccionTiposByStatusSpecification
		: Specification<ProduccionTipo>
	{

		#region Private properties

		/// <summary>
		/// 
		/// </summary>
		private bool _status = default(bool);

		#endregion

		#region Constructor

		/// <summary>
		/// 
		/// </summary>
		/// <param name="status"></param>
		public ProduccionTiposByStatusSpecification(bool status = true)
		{
			_status = status;
		}

		#endregion

		#region Specification overrides

		/// <summary>
		/// 
		/// </summary>
		/// <returns></returns>
		public override System.Linq.Expressions.Expression<Func<ProduccionTipo, bool>> SatisfiedBy()
		{
			Specification<ProduccionTipo> specification = new DirectSpecification<ProduccionTipo>(t => t.Status == _status);
			return specification.SatisfiedBy();
		}

		#endregion

	}
}
